import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner score = new Scanner(System.in);
        int a = score.nextInt();
        int b = score.nextInt();
        int c = score.nextInt();
        int d = score.nextInt();

        double sum = a*0.2 + b*0.1 + c*0.2 + d*0.5;
        System.out.printf("%.1f", sum);
    }
}
